<template>
  <div>
    <scrollRankingBoard1 class="scrollRankingBoard1" :config="config"/>
  </div>
</template>

<script>
  import scrollRankingBoard1 from '../../../src/components/scrollRankingBoard1/src/main'
export default {
  name: "Home",
  components: {
    scrollRankingBoard1
  },
  data(){
    return {
      config:{
        data: [
          {
            name: '周口',
            value: 55123
          },
          {
            name: '南阳',
            value: 12022
          },
          {
            name: '西峡',
            value: 78932
          },
          {
            name: '驻马店',
            value: 63411
          },
          {
            name: '新乡',
            value: 44231
          },
          {
            name: '新乡',
            value: 44231
          },
          {
            name: '新乡',
            value: 44231
          },
          {
            name: '新乡',
            value: 44231
          }
        ],
        waitTime:101100,
        unit: '单位',
        valueFormatter ({ value }) {
          console.warn(arguments)
          const reverseNumber = (value + '').split('').reverse()
          let valueStr = ''

          while (reverseNumber.length) {
            const seg = reverseNumber.splice(0, 3).join('')
            valueStr += seg
            if (seg.length === 3) valueStr += ','
          }

          return valueStr.split('').reverse().join('')
        }
      }
    }
  }
};
</script>
<style lang="less" scoped>
  .scrollRankingBoard1{
    background: black;
    width:500px;
    height:300px
  }
</style>
